const mongoose = require("mongoose");
//创建管理员列表集合的约束对象
const advSchema = mongoose.Schema({
  advTitle: {//广告标题
    type: String,
    required: true
  },
  advType: {//广告类型
    type: String,
    required: true
  },
  advOrder: {//广告排序
    type: String,
    required: true
  },
  advHref: {//图片地址
    type: String,
    require: true,
  },
  addTime: {//添加时间
    type: String,
    require: true,
  },
  updateTime: {//更新时间
    type: String,
    require: true,
    default: "--"
  }
})

//根据这个约束对象创建一个管理员列表的集合
const advModel = mongoose.model("advList", advSchema);

module.exports = advModel;